package com.jiazixuan.stock.vo.resp;

import com.jiazixuan.stock.pojo.domain.MenusPermDomain;
import com.jiazixuan.stock.pojo.domain.User;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class LoginRespVoWithMenusAndPermissions extends User {
    private List<MenusPermDomain> menus= new ArrayList<>(); // 侧边栏权限树（不包含按钮权限）
    private List<String> permissions= new ArrayList<>();// 按钮权限标识
    public LoginRespVoWithMenusAndPermissions(User user) {
        super(user.getId(), user.getUsername(), user.getPhone(), user.getNickName(), user.getRealName(), user.getSex(), user.getStatus(), user.getEmail());
    }
}
